{{define "main"}}
	<h2>Edit</h2>
	<p><a href="/admin">← Index</a></p>

	{{if .error}}
		<p><strong>Error:</strong> {{.error}}</p>
	{{end}}
	
	<form method="post" action="/admin/edit">
		<input type="hidden" name="id" value="{{.id}}" />
		<fieldset><textarea name="content">{{if .markdown}}{{.markdown}}{{end}}</textarea></fieldset>

		<fieldset><input type="submit" value="Save" /></fieldset>
	</form>

	<p><a href="/admin/delete/{{.id}}">× Delete</a></p>
{{end}}